<div class=" navbar navbar-default navbar-fixed-top" id="publicHeaderApp" th:fragment="publicHeader">
    <div class="container-fluid" >

        <div class="row">
            <div class="col-md-12 text-center" style="background-color: cornflowerblue; color: white">
                <a th:href="@{/}" style="color: white"><h3>周考</h3></a>
            </div>
        </div>

        <div class="row" style="margin-top: 10px">

            <div class="col-md-6">
            </div>

            <div class="col-md-3">
                <form action="" method="post" class="form-inline">
                    <div class="form-group">
                        <input v-model="keyword" type="text" name="searchName" class="form-control" id="search"
                               placeholder="请输入搜索关键词">
                    </div>
                    <button type="submit" class="btn btn-default" @click.prevent="search()" >搜索</button>
                </form>
            </div>

            <div class="col-md-3">
                <a v-if="!currentUserName" class="btn btn-default btn-sm" href="/login.html">登录</a>
                <a v-if="!currentUserName" class="btn btn-default btn-sm" href="/register.html">注册</a>
                <a v-if="currentUserName" class="btn btn-default btn-sm" href="/mycart.html">我的购物车</a>
                <a v-if="currentUserName" class="btn btn-default btn-sm" href="/myorder.html">我的订单</a>
                <a v-if="currentUserName" @click="logout" class="btn btn-default btn-sm" href="">退出</a>
            </div>

        </div>

    </div>

</div>